<?php

declare(strict_types=1);

/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */

use Hyperf\HttpServer\Router\Router;

Router::addRoute(['GET', 'POST', 'HEAD'], '/', 'App\Controller\IndexController@index');

Router::get('/favicon.ico', function () {
    return '';
});


Router::get('/im/init', 'App\Controller\IMController@init');//初始方法


Router::addGroup('/im/', function () {
    Router::get('members', 'App\Controller\IMController@members');//获取群员
    Router::post('uploadFile', 'App\Controller\IMController@uploadFile');//上传文件，自动判断图片or文件
    Router::post('sign', 'App\Controller\IMController@sign');//修改签名
    Router::post('online', 'App\Controller\IMController@online');//修改在线状态
    Router::addRoute(['GET', 'POST'],'chatLog', 'App\Controller\IMController@chatLog');//聊天记录

}, ['middleware' => [\App\Middleware\AuthMiddleware::class]]);

